function validate(value) {
    debugger
    const fileId = value[0];
    let params = [{
        name: "fileId", valueContent: fileId
    }, {
        name: "serviceType", valueContent: 'PanFileService'
    }];

    return validatePhoto(params).then(res => {
        const result = JSON.parse(res.result);
        if (result.success) {
            return {success: true};
        } else {
            return {success: false, message: result.message};
        }
    });
}


/**
 * 校验照片
 */
function validatePhoto(params) {
    return new Promise((resolve, reject) => {
        api.DATA_SOURCE_EXECUTE("ds_api:b15abd8a-1b8f-4e4f-ac99-6b2f96571234", "api", params, [], "")
            .then(res => {
                resolve(res); // 确保 Promise 有返回值
            }).catch(err => {
            reject(err); // 处理错误情况
        });
    });
}

